package com.atguigu.gulimall.product.entity;

import com.atguigu.common.valid.AddGroup;
import com.atguigu.common.valid.ListValue;
import com.atguigu.common.valid.UpdateGroup;
import com.atguigu.common.valid.UpdateStatusGroup;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * Æ·ÅÆ
 * 
 * @author guokefa
 * @email guokefa@gmail.com
 * @date 2022-02-09 14:35:35
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * Æ·ÅÆid
	 */
	@NotNull(message = "品牌ID不能为空",groups = {UpdateGroup.class})
	@Null(message = "品牌ID可以省略",groups = {AddGroup.class})
	@TableId
	private Long brandId;
	/**
	 * 品牌名
	 */
	@NotBlank(message = "品牌名不能为空",groups = {AddGroup.class,UpdateGroup.class}) //不能为空
	private String name;
	/**
	 * Æ·ÅÆlogoµØÖ·
	 */
	@NotBlank(message = "logo地址不能为空",groups = {AddGroup.class})
	@URL(message = "logo必须是url地址",groups = {AddGroup.class,UpdateGroup.class})
	private String logo;
	/**
	 * ½éÉÜ
	 */
	private String descript;
	/**
	 *  状态
	 */
	@ListValue(vals = {0,1},groups = {AddGroup.class, UpdateStatusGroup.class},message = "必须是校验的0，1")
	private Integer showStatus;
	/**
	 * ¼ìË÷Ê××ÖÄ¸
	 */

	private String firstLetter;
	/**
	 * ÅÅÐò
	 */
	private Integer sort;

}
